import Vue from 'vue'
import App from './App.vue'

Vue.config.productionTip = false

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

import NutUI from '@nutui/nutui';
import '@nutui/nutui/dist/nutui.css';
NutUI.install(Vue);


//代码高亮文件引入
import hljs from 'highlight.js'
//样式文件,这里我选的是sublime样式，文件里面还有其他样式可供选择
import 'highlight.js/styles/monokai-sublime.css'

Vue.directive('highlight', function (el) {
  let blocks = el.querySelectorAll('pre code');
  blocks.forEach((block) => {
    hljs.highlightBlock(block)
  })
})

import vcolorpicker from 'vcolorpicker'
Vue.use(vcolorpicker)


/**引入组件 */
import components from "@/low-code-components/"
/**外部封装的axios */
import axios from 'axios';
/**接口域名 */
import { apiurl } from "@/config";

/**注册低代码插件 */
import lowCode from "@/low-code/registered/"
Vue.use(lowCode, {
  axios: axios,
  prefixUrl: apiurl,
  components
})




import router from './router' //引入路由
const Bus = new Vue()


// require("../mock/index")



new Vue({
  data: {
    Bus
  },
  router,
  render: h => h(App),
}).$mount('#app')
